﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using Microsoft.Clm;

namespace FIMCMTools.Providers
{
    public class CustomUserPinProvider : ICustomUserPinGenerator
    {
        public string GenerateUserPin(Guid scUuid, ref bool bHandled)
        {
            
            string pin = ConfigurationManager.AppSettings["FIMCMTools.CustomPin"];
            if (string.IsNullOrEmpty(pin))
                return pin;
            else
                throw new ConfigurationErrorsException("to use the CustomUserPinGenerator set the FIMCMTools.CustomPin appSetting to the value of choice");
        }
    }
}
